<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Think Admin 后台管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/public/static/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/public/static/css/font-awesome.min.css">
    <!--CSS引用-->
    {block name="css"}{/block}
    <link rel="stylesheet" href="/public/static/css/admin.css">
    <!--[if lt IE 9]>
    <script src="/public/static/js/html5shiv.min.js"></script>
    <script src="/public/static/js/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <!--头部-->
    <div class="layui-header header">
        <a href=""><img class="logo" src="/public/static/images/admin_logo.png" alt=""></a>
        <div class="user-action">
            <a href="javascript:;">{:session('admin_name')}</a>
            <a class="" href="{:url('admin/login/logout')}">退出</a>
        </div>
    </div>

    <!--侧边栏-->
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree" id="nav-tree">
                <li class="layui-nav-item layui-nav-title"><a>管理菜单</a></li>
                <li class="layui-nav-item layui-this">
                    <a href="/index.php/admin/index/index"><i class="fa fa-home"></i> 网站概览</a>
                </li>
                <li class="layui-nav-item">
                    <a href="" data-url="/index.php/admin/system/clear" id="clear-cache"><i class="fa fa-trash-o"></i> 清除缓存</a>
                </li>
                {foreach name="menu" item="vo"}
                {if condition="isset($vo['children'])"}
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="{$vo.icon}"></i> {$vo.title}</a>
                    {foreach name="vo['children']" item="v"}
                    <dl class="layui-nav-child">
                        <dd>
                            <a href="{:url($v.name)}"> {$v.title}</a>
                        </dd>
                    </dl>
                    {/foreach}
                </li>
                {else /}
                <li class="layui-nav-item">
                    <a href="{:url($vo.name)}"><i class="{$vo.icon}"></i> {$vo.title}</a>
                </li>
                {/if}
                {/foreach}

                <li class="layui-nav-item" style="height: 30px; text-align: center"></li>
            </ul>
        </div>
    </div>

    <!--主体-->
    {block name="body"}{/block}

    <!--底部-->
    <div class="layui-footer footer">
        <div class="layui-main">
            <p>2016 &copy; <a href="https://github.com/xiayulei/think_admin" target="_blank">Think Admin</a></p>
        </div>
    </div>
</div>

<!--JS引用-->
<script src="/public/static/js/jquery.min.js"></script>
<script src="/public/static/layui/layui.js"></script>
<script>
    layui.config({
        base: '/public/static/js/'
    }).use('admin');

    var _current_url = "admin/{$controller}";
    $('.layui-nav-item').removeClass('layui-this');
    $('.layui-nav-tree a[href*="'+_current_url+'"]').parents('.layui-nav-item').addClass('layui-this layui-nav-itemed');
</script>
{block name="js"}{/block}
<!--页面JS脚本-->
{block name="script"}{/block}
</body>
</html>